function hd_modal(e) {
	e.width = e.width || "500", e.height = e.height || "200";
	var t = -1 * e.width / 2;
	if (e.title = e.title || "温馨提示", e.shade = void 0 != e.shade ? e.shade : !0, e.shadeOpacity = e.shadeOpacity || .9, e.timeout = e.timeout || 0, e.button = void 0 != e.button ? e.button : !0, e.button_success = e.button_success, e.button_cancel = e.button_cancel, e.content = e.content || "", hd_modal_success_handlel = e.success, hd_modal_cancel_handle = e.cancel, hd_remove_model(), e.button) {
		var n = '<div class="hd-modal-btn">';
		e.button_success && (n += '<a class="hd-btn hd-btn-success" href="javascript:;" onclick="hd_modal_success()">' + e.button_success + "</a>&nbsp;"), e.button_cancel && (n += '<a class="hd-btn" href="javascript:;" onclick="hd_modal_close()">' + e.button_cancel + "</a>"), n += "</div>"
	} else var n = "";
	shadeHtml = e.shade ? '<div id="hd-modal-bg" style="opacity:' + e.shadeOpacity + ";filter:alpha(opacity=" + 10 * e.shadeOpacity + ');">背景遮罩</div>' : "";
	var a = shadeHtml + '    <div id="hd-modal" style="width:' + e.width + "px;height:" + e.height + "px;margin-left:" + t + 'px">        <div class="hd-modal-wrap" style="height:' + e.height + 'px">            <div class="hd-modal-header">                <span class="hd-modal-title">' + e.title + '</span>                <span class="hd-modal-close" onclick="hd_modal_close();"></span>            </div>            <div class="hd-modal-message">' + e.content + "</div>            " + n + "        </div>    </div>";
	$("body").append(a), e.timeout > 0 && setTimeout(function() {
		hd_remove_model()
	}, 1e3 * e.timeout)
}

function hd_remove_model() {
	$("#hd-modal").remove(), $("#hd-modal-bg").remove()
}

function hd_modal_success() {
	return hd_remove_model(), hd_modal_success_handlel && hd_modal_success_handlel(), !0
}

function hd_modal_close() {
	return hd_remove_model(), hd_modal_cancel_handle && hd_modal_cancel_handle(), !1
}